From LL-Regular to LL (1) Grammars: Transformations, Covers and Parsing

نویسنده

  • Anton Nijholt
چکیده

— In this paper it is shown that it is possible to transform any LL-regular grammar G into an LL{\) grammar G' in such a way that parsing G' is as good as parsing G. That ist a par se of a sentence of grammar G can be obtained with a simple string homomorphism from the parse of a corresponding sentence of G'. Since any LL (k) grammar is an LL-regular grammar the results which are obtained are valid for LL (k) grammars as well. The relation between LL-regular and LL(1) grammars is expressed by means of a generalized version of the well-known cover relation between two context-free grammars. * Resumé. — On montre que toute grammaire LL-régulière G peut se transformer en une grammaire LL (1) G' de telle sorte que Vanalyse de G' soit équivalente à celle de G, en ce sens qu'une dérivation d'un mot selon G soit image homomorphe de la dérivation du mot correspondant selon G' . Comme toute grammaire LL{k) est LL-régulière, nos résultats valent aussi bien pour les grammaires LL(k). La relation entre grammaires LL-régulières et LL(1) s'exprime au moyen d'une généralisation de la relation classique de couverture entre deux grammaires algébriques (contextfree).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Expressive Power of LL(k) Boolean Grammars

The paper studies the family of Boolean LL languages, generated by Boolean grammars and usable with the recursive descent parsing. It is demonstrated that over a one-letter alphabet, these languages are always regular, while Boolean LL subsets of Σ∗a∗ obey a certain periodicity property, which, in particular, makes the language {anb2n | n > 0} non-representable. It is also shown that linear con...

متن کامل

Tests for the LR-, LL-, and LC-Regular Conditions

Most of the linear time parsing strategies (e.g., LL(k) and U(k) type parsers) for context-free grammars operate by looking ahead on the input tape for a fixed number of symbols. The fixed length look-ahead strings partition the set of input strings into classes of strings which are equivalent with respect to parsing decisions. A moment’s thought shows that these look-ahead classes are regular ...

متن کامل

Ch(k) Grammars: A Characterization of LL(k) Languages

From the point of view of parsing the LL(K] grammars constitute a very attractive class of context-free grammars. For each LL{K] grammar a top-down parsing algorithm can be devised which is essentially a one-state deterministic push-down automaton. From a more theoretiG point of view LL[K) grammars are attractive as well. It is well-known, for example, that it is decidable whether two LLfk) gra...

متن کامل

Simple Chain Grammars

A subclass of the LR(0)-grammars, the class of simple chain grammars is introduced. Although there exist simple chain gr~ars which are not LL(k) for any k, this new class of grammars is very close related to the class of LL(1) and simple LL(1) grammars. In fact it can be proved (not in this paper) that each simple chain grammar has an equivalent simple LL(1) grammar. A very simple (bottom-up) p...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • ITA

دوره 16  شماره 

صفحات  -

تاریخ انتشار 1982